function initInfoSelector()
{
	var H,B,D,C;
	var F=document.getElementById("InfoSelectorTarget");
	if(!F)
	{
		return
	}
	var E=createElement("ul");
	E.className="TabBarLevel1";
	E.id="InfoSelector";
	E=F.appendChild(E);
	for(D=0; D<TabNames.length; D++)
	{
		H=createElement("li");
		H.id="Tab"+TabIds[D];
		if(D==0)
		{
			H.className="Selected"
		}
		H=E.appendChild(H);
		B=createElement("a");
		B=H.appendChild(B);
		B.appendChild(document.createTextNode(TabNames[D]))
	}
	document.getElementById(TabIds[0]).className="CurInfo";
	var A=document.getElementById("InfoSelector");
	if(!A)
	{
		return
	}
	var G=A.getElementsByTagName("li");
	for(D=0; D<G.length; D++)
	{
		for(C=0; C<G[D].childNodes.length; C++)
		{
			if(G[D].childNodes[C].tagName=="A"||G[D].childNodes[C].tagName=="a")
			{
				G[D].childNodes[C].onmouseover=activeInfoStyle;
				G[D].childNodes[C].onmouseout=inactiveInfoStyle;
				G[D].childNodes[C].onclick=switchInfo;
				break
			}
		}
	}
	A.onclick=null
}
function switchInfo(B)
{
	for(var A=0; A<TabNames.length; A++)
	{
		if(getTriggerNode(B).parentNode.id=="Tab"+TabIds[A])
		{
			doSwitchInfo(A)
		}

	}

}
function doSwitchInfo(C)
{
	for(var B=0; B<TabNames.length; B++)
	{
		var A=document.getElementById(TabIds[B]);
		if(!A)
		{
			return
		}
	if(C==0)
		{
			A.style.display="";
			A.className="";
			document.getElementById(TabIds[0]).className="CurInfo";
			switchTab(0)
		}
		else
		{
			A.style.display="none";
			if(C==B)
			{
				A.style.display="";
				A.className="CurInfo";
				switchTab(B)
			}
		}
	}
}
function activeInfoStyle(A)
{
	getTriggerNode(A).style.color="#FF5500"
}
function inactiveInfoStyle(A)
{
	if(getTriggerNode(A).parentNode.className=="Selected")
	{
		getTriggerNode(A).style.color="#FFFFFF"
	}
	else
	{
		getTriggerNode(A).style.color="#333333"
	}

}
function switchTab(D)
{
	for(var B=0; B<TabNames.length; B++)
	{
		var A=document.getElementById("Tab"+TabIds[B]);
		A.className="";
		var C=A.getElementsByTagName("a");
		C[0].style.color="#333333"
	}
	document.getElementById("Tab"+TabIds[D]).className="Selected"
}
function createElement(A)
{
	if(typeof document.createElementNS!="undefined")
	{
		return document.createElementNS("http://www.w3.org/1999/xhtml",A)
	}
	if(typeof document.createElement!="undefined")
	{
		return document.createElement(A)
	}
	return false
}
function getTriggerNode(B)
{
	var A;
	if(document.all)
	{
		A=event.srcElement
	}
	else
	{
		A=B.target
	}
	return A
}

function convertTabMap(TabMaps)
{
	for(var id in TabMaps)
	{
		TabIds[TabIds.length] = id;
		TabNames[TabNames.length] = TabMaps[id];
	}
}